package com.xuerhua.yxt.baidu.model;

import java.io.Serializable;

import org.apache.commons.lang.StringUtils;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
/**
 * 是否带眼镜
 * @author hqm
 *
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class Glasses implements Serializable {

	private static final long serialVersionUID = 3842789268368583256L;
	//none:无眼镜，common:普通眼镜，sun:墨镜
	private String type;
	//眼镜置信度，范围【0~1】，0代表概率最小、1代表最大
	private Double probability;
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Double getProbability() {
		return probability;
	}
	public void setProbability(Double probability) {
		this.probability = probability;
	}
	public boolean isGlasses() {
		if(StringUtils.isNotBlank(this.type)) {
			if("none".equals(this.type)) {
				return false;
			}
		}
		return true;
	}
}
